from rest_framework.pagination import PageNumberPagination

class MyPageNumberPagination(PageNumberPagination):
    # 自定义分页器
    page_size = 6
    page_size_query_param = 'page_size'
    page_query_param='page1'
    max_page_size = 20